package net.wofly.sale.order.service.impl;

import java.util.List;

import javax.transaction.Transactional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import net.wofly.sale.order.repository.TakeGoodsShopInfoRepository;
import net.wofly.sale.order.domain.TakeGoodsShopInfo;
import net.wofly.sale.order.service.ITakeGoodsShopInfoService;

@Service("iTakeGoodsShopInfoService")
@Transactional
public class TakeGoodsShopInfoServiceImpl implements ITakeGoodsShopInfoService {

	@Autowired
	TakeGoodsShopInfoRepository takeGoodsShopInfoRepository;

	@Override
	public TakeGoodsShopInfo save(TakeGoodsShopInfo entity) {
		return takeGoodsShopInfoRepository.save(entity);
	}

	@Override
	public void delete(TakeGoodsShopInfo entity) {
		takeGoodsShopInfoRepository.delete(entity);
	}

	@Override
	public void delete(String key) {
		takeGoodsShopInfoRepository.delete(key);
	}

	@Override
	public TakeGoodsShopInfo findOne(String key) {
		return takeGoodsShopInfoRepository.findOne(key);
	}

	@Override
	public List<TakeGoodsShopInfo> save(List<TakeGoodsShopInfo> entityList) {
		return (List<TakeGoodsShopInfo>) takeGoodsShopInfoRepository.save(entityList);
	}
	
	@Override
	public TakeGoodsShopInfo findByOrderID(String orderID) {
		return takeGoodsShopInfoRepository.findByOrderID(orderID);
	}
}
